home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / amac34.arc / CENT10.QM < prev    next >
Text File  |  1991-02-16  |  6KB  |  155 lines

  1. *                            CENT10.QM, v1.1f
  2. *           Macros to Center Lines, Paragraphs and Documents
  3. *
  4. * Here are five handy macros to center text:
  5. *
  6. * @1 - Centers line, moves to next line
  7. * @2 - Centers paragraph, moves to next paragraph
  8. * @3 - Centers entire document
  9. * @4 - Centers line after typing, from Kyle Watkins, SemWare
  10. *      (same as greyenter, except for use with NON-enhanced keyboards)
  11. * greyenter - Centers line after typing, from Kyle Watkins, SemWare
  12. *             (for use with enhanced keyboards only)
  13.  
  14. * Version History:
  15. *
  16. * 1.1a -added greyenter to center line after typing, from Kyle Watkins,
  17. *       SemWare, for use with enahanced keyboards only.
  18. * 1.1b -added @4 to center line after typing, from Kyle Watkins,
  19. *       SemWare, for use with NON-enhanced keyboard.
  20. * 1.1c -Change file name CENTER10 to CENT10.
  21. * 1.1d -Changed documentation
  22. * 1.1e -Changed documentation
  23. * 1.1f -Changed documentation and added START.BAT.
  24. *      -Changed CENTER file names to CENT.
  25.  
  26. * For other macros, see ALLMACRO.INF.
  27.  
  28. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  29. *
  30. * To BEGIN, just type "START CENT" <Enter>. All pertinent files will be
  31. * loaded in the "Ring" for viewing, and CENT10.MAC is read.
  32. * Alternatively, type "START CENT 0" <Enter> and the disk copies of all
  33. * files in the "Ring" will be loaded ready for editing, saving time.
  34.  
  35.  
  36.  
  37.  
  38. * ┌──────────────────────────────────┐
  39. * │@1 Centers line, moves to next    │
  40. * └──────────────────────────────────┘
  41. * To run place cursor line on desired line to center and press
  42. * Alt & 1 at the same time.
  43. *
  44. @1 macrobegin                           *
  45.         centerline                      * center line
  46.         cursordown                      * move to next line
  47. *
  48. * 6 bytes Sat  08-25-1990  12:13:33
  49.  
  50.  
  51.  
  52.  
  53. * ┌─────────────────────────────────────────────────────────────────┐
  54. * │@2 Centers all lines in a paragraph, moves to next paragraph     │
  55. * └─────────────────────────────────────────────────────────────────┘
  56. * To run place cursor line in a paragraph to center and press
  57. * Alt & 2 at the same time.
  58. *
  59. @2 macrobegin
  60.         cursordown                      * move down one line
  61.                                         * stays in para if @ col/lin 1/1
  62.         prevpara                        * go to paragraph begin
  63.  CENTERPARA:                            *
  64.         endline begline                 * blank line?
  65.  Jfalse AGAIN:                          * if blank, go to next paragraph
  66.         centerline                      * center line
  67.         cursordown                      * move to next line
  68.  Jump CENTERPARA:                       * continue centering
  69.  AGAIN:                                 *
  70.         nextpara                        * go to next paragraph when done
  71.         makectrofscreen                 * better viewing
  72. *
  73. * 18 bytes Sat  08-25-1990  12:13:44
  74.  
  75.  
  76.  
  77.  
  78. * ┌─────────────────────────────────────────────────────────┐
  79. * │@3 Centers entire document, supplied by Robert Danek     │
  80. * └─────────────────────────────────────────────────────────┘
  81. * To run press Alt & 3 at the same time with cursor line anywhere
  82. * in the document.
  83. *
  84. @3 Macrobegin                  * Macro to Center entire text.
  85.                 endfile                 * Test for trailing blank lines.
  86.             LABEL0:
  87.                 endline begline         * "  "  "  "  "   "   "   "    "
  88.             Jtrue LABEL1:               * If not, then begin centering
  89.                 DelLine                 * Delete trailing blank.
  90.                 CursorUp                * Go up.
  91.             Jump LABEL0:                * Retest.
  92.             LABEL1:
  93.                 begfile                 * Go to the beginning of your text.
  94.             LABEL2:
  95.                 endline begline         *\ Tests whether there's anything
  96.             jtrue LABEL3:               */ to center
  97.                 cursordown              * If there isn't, go to next line.
  98.                 jump LABEL2:
  99.            LABEL3:
  100.                 MarkLine CenterLine     *\ Centers the current
  101.                 UnmarkBlock             */ line of text.
  102.                 CursorDown              * Check for eof.
  103.            jfalse LABEL4:               * If yes, go to ending.
  104.            jump LABEL2:                 * Repeat test
  105.            LABEL4:
  106.                 begfile                 * Return to the top.
  107. *
  108. * 36 bytes Sat  08-25-1990  14:22:46
  109.  
  110.  
  111.  
  112.  
  113. *┌─────────────────────────────────────────────────────────────────┐
  114. *│ Center line after typing, from Kyle Watkins, Semware            │
  115. *└─────────────────────────────────────────────────────────────────┘
  116. *     You can use the Centerline command, to center the current line
  117. * (based on your right margin setting) -- or use line blocking to mark a
  118. * range of lines -- then issue the Centerline command to center the
  119. * individual lines of the marked line block.
  120. *     If you have an enhanced keyboard, and you have QEdit using the
  121. * enhanced keyboard, you may want to try the following macro:
  122.   
  123.   
  124. greyenter   macrobegin centerline endline return
  125. *
  126. * 7 bytes Sat  08-25-1990  17:32:31 (size added by TH)
  127.  
  128. * Now when you type your text, then press the Grey Enter Key (Far right
  129. * hand side of your keyboard), your text will be centered as the cursor
  130. * moves to the next line.
  131. *     This will keep your regular Enter key, to be used as normal --
  132. * Please note that if you DO NOT have an enhanced (101 key) keyboard, with
  133. * QEdit recognizing it as such -- then the Grey Enter and regular Enter,
  134. * are treated as the same key.
  135. *     Hope that helps.
  136. *                              --... ...--
  137. * .......Kyle Watkins (SemWare Technical Support)
  138. *
  139.  
  140.  
  141.  
  142. *┌─────────────────────────────────────────────────────────────────┐
  143. *│ @4 Center line after typing, from Kyle Watkins, Semware         │
  144. *└─────────────────────────────────────────────────────────────────┘
  145. * In case you do not have an enhanced keyboard, you may want to use
  146. * the following macro instead:
  147. *
  148. @4  macrobegin centerline endline return
  149. *
  150. * 7 bytes Sun  08-26-1990  03:08:09
  151.  
  152.  
  153.  
  154. *  Tom Hogshead  Wed  10-31-1990
  155.